//
//  CTImageScrollBaseCell.m
//  jdforme
//
//  Created by leo on 2017/5/18.
//  Copyright © 2017年 leojingdong.com. All rights reserved.
//

#import "CTImageScrollBaseCell.h"
#import "UIImageView+WebCache.h"

@interface CTImageScrollBaseCell ()
@property (nonatomic, weak) UIImageView *imageView;

@end

@implementation CTImageScrollBaseCell

- (UIImageView *)imageView {
    
    if (_imageView == nil) {
        
        UIImageView *tempImageView = [[UIImageView alloc] initWithFrame:self.contentView.bounds];
        _imageView = tempImageView;
        [self.contentView addSubview:tempImageView];
    }
    return _imageView;
    
}

-(void)setImage:(UIImage *)image {
    
    _image = image;
    self.imageView.image= image;
}

- (void)setImagePath:(NSURL *)imagePath {
    _imagePath = imagePath;
    [self.imageView sd_setImageWithURL:imagePath placeholderImage:[UIImage imageNamed:@"act_bg_view"]];
}
@end
